<?php

namespace app\common\command\task;

use app\common\service\MoonShotService;
use app\common\service\One23PanService;
use think\facade\Config;

/**
 *
 * php think cron test
 */
class Test
{
    /**
     * invoke
     * @throws
     */
    public function invoke()
    {

        $s = new One23PanService();
        $s->init(1000);
        $res = $s->buildSignedUrl(21230666, 86400);

        var_dump($res);

        die();

        $s = new MoonShotService();
        $s->setApiKey('sk-FKSwOiVsHAPrWEEIAxnXzIMLLnTH5NgtkRLmYMk8r3CszKkH');
        $s->setRoleRule(file_get_contents('1.txt'));
        $s->setResponseFormat(['type' => 'json_object']);
        $res = $s->chat(file_get_contents('2.txt'));
        var_dump($res);
        die();
    }
}